home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / help.vim < prev    next >
Encoding:
Text File  |  2001-07-24  |  3.2 KB  |  100 lines

  1. " Vim syntax file
  2. " Language:    Vim help file
  3. " Maintainer:    Bram Moolenaar (Bram@vim.org)
  4. " Last Change:    2001 Jul 24
  5.  
  6. " For version 5.x: Clear all syntax items
  7. " For version 6.x: Quit when a syntax file was already loaded
  8. if version < 600
  9.   syntax clear
  10. elseif exists("b:current_syntax")
  11.   finish
  12. endif
  13.  
  14. syn match helpHeadline        "^[A-Z ]\+[ ]\+\*"me=e-1
  15. syn match helpSectionDelim    "^=\{3,}.*===$"
  16. syn match helpSectionDelim    "^-\{3,}.*--$"
  17. syn region helpExample        matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<"
  18. if has("ebcdic")
  19.   syn match helpHyperTextJump    "\\\@<!|[^"*|]\+|"
  20.   syn match helpHyperTextEntry    "\*[^"*|]\+\*\s"he=e-1
  21.   syn match helpHyperTextEntry    "\*[^"*|]\+\*$"
  22. else
  23.   syn match helpHyperTextJump    "\\\@<!|[#-)!+-~]\+|"
  24.   syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*\s"he=e-1
  25.   syn match helpHyperTextEntry    "\*[#-)!+-~]\+\*$"
  26. endif
  27. syn match helpNormal        "|.*====*|"
  28. syn match helpVim        "Vim version [0-9.a-z]\+"
  29. syn match helpVim        "VIM REFERENCE.*"
  30. syn match helpOption        "'[a-z]\{2,\}'"
  31. syn match helpOption        "'t_..'"
  32. syn match helpHeader        ".*\~$"me=e-1 nextgroup=helpIgnore
  33. syn match helpIgnore        "." contained
  34. syn keyword helpNote        note Note NOTE note: Note: NOTE:
  35. syn match helpSpecial        "\<N\>"
  36. syn match helpSpecial        "(N\>"ms=s+1
  37. syn match helpSpecial        "\[N]"
  38. " avoid highlighting N  N in help.txt
  39. syn match helpSpecial        "N  N"he=s+1
  40. syn match helpSpecial        "Nth"me=e-2
  41. syn match helpSpecial        "N-1"me=e-2
  42. syn match helpSpecial        "{[-a-zA-Z0-9'":%#=[\]<>.]\+}"
  43. syn match helpSpecial        "\s\[[-a-zA-Z0-9_]\{2,}]"ms=s+1
  44. syn match helpSpecial        "<[-a-zA-Z0-9_]\+>"
  45. syn match helpSpecial        "<[SCM]-.>"
  46. syn match helpNormal        "<---*>"
  47. syn match helpSpecial        "\[range]"
  48. syn match helpSpecial        "\[line]"
  49. syn match helpSpecial        "\[count]"
  50. syn match helpSpecial        "\[offset]"
  51. syn match helpSpecial        "\[cmd]"
  52. syn match helpSpecial        "\[num]"
  53. syn match helpSpecial        "\[+num]"
  54. syn match helpSpecial        "\[-num]"
  55. syn match helpSpecial        "CTRL-."
  56. syn match helpSpecial        "CTRL-Break"
  57. syn match helpSpecial        "CTRL-PageUp"
  58. syn match helpSpecial        "CTRL-PageDown"
  59. syn match helpSpecial        "CTRL-Insert"
  60. syn match helpSpecial        "CTRL-Del"
  61. syn match helpSpecial        "CTRL-{char}"
  62. syn region helpNotVi        start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump
  63. syn match helpLeadBlank        "^\s\+" contained
  64.  
  65. syn sync minlines=40
  66.  
  67.  
  68. " Define the default highlighting.
  69. " For version 5.7 and earlier: only when not done already
  70. " For version 5.8 and later: only when an item doesn't have highlighting yet
  71. if version >= 508 || !exists("did_help_syntax_inits")
  72.   if version < 508
  73.     let did_help_syntax_inits = 1
  74.     command -nargs=+ HiLink hi link <args>
  75.   else
  76.     command -nargs=+ HiLink hi def link <args>
  77.   endif
  78.  
  79.   hi link helpExampleStart    helpIgnore
  80.   hi link helpIgnore        Ignore
  81.   hi link helpHyperTextJump    Subtitle
  82.   hi link helpHyperTextEntry    String
  83.   hi link helpHeadline        Statement
  84.   hi link helpHeader        PreProc
  85.   hi link helpSectionDelim    PreProc
  86.   hi link helpVim        Identifier
  87.   hi link helpExample        Comment
  88.   hi link helpOption        Type
  89.   hi link helpNotVi        Special
  90.   hi link helpSpecial        Special
  91.   hi link helpNote        Todo
  92.   hi link Subtitle        Identifier
  93.  
  94.   delcommand HiLink
  95. endif
  96.  
  97. let b:current_syntax = "help"
  98.  
  99. " vim: ts=8 sw=2
  100.